<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>成长树</title>
    <link rel="stylesheet" href="./css/reset.css">
    <style>
        #app {
            width: 400px;
            height: 500px;
            color: #b36226;
            padding: 20px 10px;
            border-radius: 30px;
            border: 5px solid #e7be80;
            background-color: #fbe7d2;
            margin: 100px auto;
        }

        .header {
            width: 100%;
            text-align: center;
        }

        .title {
            height: 40px;
            line-height: 40px;
            font-size: 22px;
            font-weight: 700;
            letter-spacing: 2px;
            /* background-color: red; */
        }

        .title-desc {
            width: 360px;
            height: 30px;
            line-height: 30px;
            font-size: 12px;
            margin: 0 auto;
            /* box-shadow: 0 5px 5px; */
            /* background-color: blue; */
        }

        span {
            font-size: 14px;
            color: #eab645;
            font-weight: 700;
        }

        /* .footer{} */
        .item {
            height: 80px;
            background-color: #fff;
            border-radius: 10px;
            margin-top: 10px;
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 0 10px;
        }

        .left {
            width: 60px;
            height: 60px;
            border-radius: 50%;
            border: 3px solid #eaa539;
            margin-right: 10px;
        }

        img {
            width: 100%;
            border-radius: 50%;
        }

        .middle {
            flex: 1;
            line-height: 24px;
        }

        .name {
            font-size: 18px;
            font-weight: 700;
            letter-spacing: 1px;
        }

        .desc {
            font-size: 12px;
        }

        button {
            width: 80px;
            height: 30px;
            color: #c05c23;
            font-weight: 700;
            border: 3px solid #eaa539;
            border-radius: 20px;
            background-color: #faeb81;
            /* background-color: #f3b248; */
        }

        .close{
            width: 30px;
            height: 30px;
            color: #fff;
            background-color: red;
            border-radius: 50%;
            font-weight: 700;
            text-align: center;
            line-height: 30px;
            font-size: 30px;
            position: absolute;
        }
    </style>
</head>

<body>
    <div id="app">
        <div class="header">
            <div class="title">任务列表</div>
            <div class="title-desc">每完成一个任务，即可获得<span>10MB-1GB</span>流量哦!</div>
        </div>
        <div class="footer">
            <div class="item" v-for="(item,index) in tasklist" v-bind:key="index">
                <div class="left">
                    <img v-bind:src="item.img_src" alt="">
                </div>
                <div class="middle">
                    <div class="name">{{item.name}}</div>
                    <div class="desc">{{item.desc}}</div>
                </div>
                <div class="right">
                    <button>{{item.status == '1' ? '去完成' : item.status == '2' ? '领取' : '已领取'}}</button>
                </div>
            </div>
        </div>
    </div>
    <div class="close">×</div>
</body>

</html>
<script src="./js/vue-2.5.21.js"></script>
<script>
    let v = new Vue({
        el: '#app',
        data: {
            tasklist: [
                { id: 1, img_src: './img/pic.png', name: '咪咕视频送流量', desc: '来咪咕视频，每月领500MB流量奖励', status: 1 },
                { id: 2, img_src: './img/pic.png', name: '和彩云送福利', desc: '免费领100G空间+月月2GB', status: 2 },
                { id: 3, img_src: './img/pic.png', name: '最高40元套餐折扣券', desc: '参与抽奖，奖励10MB，经验值+10', status: 3 },
                { id: 4, img_src: './img/pic.png', name: '吃喝玩乐季，超级秒杀', desc: '进入隐藏二楼参与秒杀，奖励10MB，经验值+10', status: 1 },
            ]
        },
    })
</script>